home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / LongOption.java < prev    next >
Text File  |  1998-09-08  |  919b  |  41 lines

  1. package com.symantec.itools.frameworks.application.commandline;
  2.  
  3.  
  4. /**
  5.  * @author Symantec Internet Tools Division
  6.  * @version 1.0
  7.  * @since VCafe 3.0
  8.  */
  9.  
  10. public abstract class LongOption 
  11.     extends SingleOption
  12. {
  13.     protected LongOption()
  14.     {
  15.     }
  16.     
  17.     protected LongOption(String[] flags)
  18.     {
  19.         super(flags);        
  20.     }
  21.  
  22.     /**
  23.      * @param args TODO
  24.      * @param startIndex TODO
  25.      * @exception com.symantec.itools.frameworks.application.commandline.MissingArgumentsException
  26.      * @since VCafe 3.0
  27.      */    
  28.     protected long getLong(String[] args, int startIndex)
  29.         throws MissingArgumentsException
  30.     {
  31.         try
  32.         {
  33.             return Long.parseLong(args[startIndex + 1]);
  34.         }
  35.         catch(ArrayIndexOutOfBoundsException ex)
  36.         {
  37.             throw new MissingArgumentsException(args[startIndex]);
  38.         }
  39.     }
  40. }
  41.